<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>index</title>
	<style type="text/css">
		.wrapper {
			width: 300px;
			height: 300px;
			background-color: red;
			margin: 0 auto;
			position: relative;
		}
		.content {
			width: 100px;
			height: 100px;
			background-color: yellow;
			position: absolute;
			top: 50%;
			left: 50%;
			margin:-50px 0 0 -50px;
		}
	</style>
</head>
<body>
	<div class="wrapper">
		<div class="content"></div>
	</div>
</body>
</html>